<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>

<%@ page import="java.util.List"%>
<%@ page import="web1.bean.user"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<base href="<%=basePath%>">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
	<table border="1" width="100%">
		<tr>
			<th>ID</th>
			<th>姓名</th>
			<th>年龄</th>
			<th>性别</th>
		</tr>
		<!-- 第一种方法 -->
		
<!-- 第二种方法 -->		
<c:forEach var="row" items="${list}">
<tr>
   <td><c:out value="${row.id}"/></td>
   <td><c:out value="${row.name}"/></td>
   <td><c:out value="${row.age}"/></td>
   <td><c:out value="${row.sex}"/></td>
</tr>
</c:forEach>
	</table>

	<a href="<%=basePath%>day0907/insert.jsp">增加数据</a>
	<a href="<%=basePath%>day0907/delete.jsp">删除数据</a>
	<a href="<%=basePath%>day0907/update.jsp">修改数据</a>
	<a href="<%=basePath%>day0907/select_one.jsp">查询一条数据</a>
	<a href="<%=basePath%>day0907/select_all.jsp">查询所有数据</a>
</body>
</html>